<template>
    <div>
        <Modal v-model="modal.search" title="高级搜索" width="1020">
            <Form ref="searchForm" :model="searchForm" :label-width="120">
                <Row>
	<i-col span="12">
	<FormItem label="模板项编号"><Row>
	<i-col span="11">
	<FormItem prop="idMin">
	<InputNumber v-model="searchForm.idMin" placeholder="请输入开始模板项编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="idMax">
	<InputNumber v-model="searchForm.idMax" placeholder="请输入结束模板项编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="模板编号"><Row>
	<i-col span="11">
	<FormItem prop="templateIdMin">
	<InputNumber v-model="searchForm.templateIdMin" placeholder="请输入开始模板编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="templateIdMax">
	<InputNumber v-model="searchForm.templateIdMax" placeholder="请输入结束模板编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="物流公司" prop="expressCompany">
	<Input v-model="searchForm.expressCompany" placeholder="请输入物流公司" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="省收货地" prop="province">
	<Input v-model="searchForm.province" placeholder="请输入省收货地" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="市收货地" prop="city">
	<Input v-model="searchForm.city" placeholder="请输入市收货地" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="区县收货地" prop="district">
	<Input v-model="searchForm.district" placeholder="请输入区县收货地" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
		<FormItem label="是否包邮" prop="expressFree">
		    
		        <Select v-model="searchForm.expressFree" placeholder="是否包邮" filterable clearable>
		          <Option
		            v-for="(option, index) in expressFreeSelect"
		            :value="option.value"
		            :key="index"
		          >{{option.displayValue}}</Option>
		        </Select>
		    
		</FormItem>
	
</i-col><i-col span="12">
	<FormItem label="快递费"><Row>
	<i-col span="11">
	<FormItem prop="expressFeeMin">
	<InputNumber v-model="searchForm.expressFeeMin" placeholder="请输入开始快递费" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="expressFeeMax">
	<InputNumber v-model="searchForm.expressFeeMax" placeholder="请输入结束快递费" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="规格"><Row>
	<i-col span="11">
	<FormItem prop="expressSpecMin">
	<InputNumber v-model="searchForm.expressSpecMin" placeholder="请输入开始规格" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="expressSpecMax">
	<InputNumber v-model="searchForm.expressSpecMax" placeholder="请输入结束规格" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="递增规格"><Row>
	<i-col span="11">
	<FormItem prop="incrementSpecMin">
	<InputNumber v-model="searchForm.incrementSpecMin" placeholder="请输入开始递增规格" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="incrementSpecMax">
	<InputNumber v-model="searchForm.incrementSpecMax" placeholder="请输入结束递增规格" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="递增快递费"><Row>
	<i-col span="11">
	<FormItem prop="incrementFeeMin">
	<InputNumber v-model="searchForm.incrementFeeMin" placeholder="请输入开始递增快递费" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="incrementFeeMax">
	<InputNumber v-model="searchForm.incrementFeeMax" placeholder="请输入结束递增快递费" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="包邮条件"><Row>
	<i-col span="11">
	<FormItem prop="freeConditionMin">
	<InputNumber v-model="searchForm.freeConditionMin" placeholder="请输入开始包邮条件" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="freeConditionMax">
	<InputNumber v-model="searchForm.freeConditionMax" placeholder="请输入结束包邮条件" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="包邮金额"><Row>
	<i-col span="11">
	<FormItem prop="freeMaxPaymentMin">
	<InputNumber v-model="searchForm.freeMaxPaymentMin" placeholder="请输入开始包邮金额" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="freeMaxPaymentMax">
	<InputNumber v-model="searchForm.freeMaxPaymentMax" placeholder="请输入结束包邮金额" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="版本号"><Row>
	<i-col span="11">
	<FormItem prop="versionMin">
	<InputNumber v-model="searchForm.versionMin" placeholder="请输入开始版本号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="versionMax">
	<InputNumber v-model="searchForm.versionMax" placeholder="请输入结束版本号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="创建时间"><Row>
	<i-col span="11">
	<FormItem prop="createTimeMin">
	<DatePicker @on-change="searchForm.createTimeMin=$event" :value="searchForm.createTimeMin" placeholder="请输入开始创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="createTimeMax">
	<DatePicker @on-change="searchForm.createTimeMax=$event" :value="searchForm.createTimeMax" placeholder="请输入结束创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="更新时间"><Row>
	<i-col span="11">
	<FormItem prop="updateTimeMin">
	<DatePicker @on-change="searchForm.updateTimeMin=$event" :value="searchForm.updateTimeMin" placeholder="请输入开始更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="updateTimeMax">
	<DatePicker @on-change="searchForm.updateTimeMax=$event" :value="searchForm.updateTimeMax" placeholder="请输入结束更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="是否激活" prop="isActive">
	    
	        <Select v-model="searchForm.isActive" placeholder="是否激活" filterable clearable>
	          <Option
	            v-for="(option, index) in isActiveSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>
</Row>

            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="resetForm">清空</Button>
                <Button type="text" size="large" @click="cancelModal">取消</Button>
                <Button type="primary" size="large" @click="searchOkModal" :loading="loading.search">查询</Button>
            </div>
        </Modal>
    </div>
</template>

<script>
	import * as utils from '@/api/utils-v2'
	import * as ResponseStatus from '@/api/response-status'
    export default {
        name: 'ExpressTemplateItemSearch',
        data() {
            return {
                modal: {
                    search: false
                },
                loading: {
                    search: false
                },
				dataDictCodes: ['IS_ACTIVE','EXPRESS_FREE'],
				dataDictItems: {},
				isActiveSelect:[],
				expressFreeSelect:[],
                urls: {
                    searchUrl: '/express-template-item/admin/pager-cond'
                },
                searchForm: {
                    pageNo: 1,
                    pageSize: 10,
                    sortColumn: null,
                    sortOrder: null,
                    id: null,
idMin: null, 
idMax: null, 
templateId: null,
templateIdMin: null, 
templateIdMax: null, 
expressCompany: null,
province: null,
city: null,
district: null,
expressFree: null,
expressFreeMin: null, 
expressFreeMax: null, 
expressFee: null,
expressFeeMin: null, 
expressFeeMax: null, 
expressSpec: null,
expressSpecMin: null, 
expressSpecMax: null, 
incrementSpec: null,
incrementSpecMin: null, 
incrementSpecMax: null, 
incrementFee: null,
incrementFeeMin: null, 
incrementFeeMax: null, 
freeCondition: null,
freeConditionMin: null, 
freeConditionMax: null, 
freeMaxPayment: null,
freeMaxPaymentMin: null, 
freeMaxPaymentMax: null, 
version: null,
versionMin: null, 
versionMax: null, 
createTime: null,
createTimeMin: null, 
createTimeMax: null, 
updateTime: null,
updateTimeMin: null, 
updateTimeMax: null, 
isActive: null,
isActiveMin: null, 
isActiveMax: null, 

                }
            }
        },
        computed: {},
        mounted() {
			utils.getDataDict(this.dataDictCodes).then(response => {
			  if (response) {
				this.dataDictItems = response
				utils.getSelectDictItems(this, 'IS_ACTIVE', 'isActive', 'isActiveSelect')
				utils.getSelectDictItems(this, 'EXPRESS_FREE', 'expressFree', 'expressFreeSelect')
			  }
			}).catch(error => {
			  console.log(error)
			})
		},
        methods: {
            resetForm() {
                this.$refs.searchForm.resetFields()
            },
            cancelModal(modal) {
                this.modal.search = false
            },
            searchOkModal(modal) {
                this.modal.search = false
                this.$emit('searchTable', true)
            }
        }
    }
</script>

<style>
</style>
